<template>
  <div>
    组件2
  </div>
  <div>{{ data }}</div>
  <div>{{ timer }}</div>
  <hr>
</template>

<script setup lang='ts'>
import { ref } from 'vue';
import { useTimer } from './useTimer';

const data = ref(Date.now().toString());

const { timer } = useTimer(() => {
  data.value = Date.now().toString();
})

</script>

<style scoped></style>